package com.haidechizi.i18n.code.generator.common.message.language;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 定义语言翻译的key
 */
public class LanguageHolder {

    private static final Map<String, Language> languageHolder = new ConcurrentHashMap<>(8);

    public static final void putLanguage(String type, Language language) {
        languageHolder.put(type, language);
    }

    public static final Language getLanguage(String type) {
        return languageHolder.get(type);
    }
}
